package com.example.properties.controller;

import com.example.properties.bean.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StuduentController {
    @Value("${student.last-name}")
    private String studentName;

    @Autowired
    Student student;

    @RequestMapping(value = "stuinfo")
    public String info(String name) {
        System.out.println(student);
        return "您好，"+studentName+"  and "+name;
    }
}
